package com.fortune.service.impl;

import com.fortune.dao.WeChatReturnDao;
import com.fortune.entity.WeChatReturnClient;
import com.fortune.service.WeChatReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WeChatReturnServiceImpl implements WeChatReturnService {
    @Autowired
    private WeChatReturnDao weChatReturnDao;

    /**
     * 查询状态为正常的回访全部列表
     * @param mid
     * @param did
     * @param duid
     * @return
     */
    @Override
    public List<WeChatReturnClient> findAllListReturnClientByStatusYes(String mid, String did, String duid) {
        List<WeChatReturnClient> findAllListReturnClientByStatusYes = weChatReturnDao.findAllListReturnClientByStatusYes(mid, did, duid);
        return findAllListReturnClientByStatusYes;
    }

    /**
     * 查询状态为非正常的回访全部列表
     * @param mid
     * @param did
     * @param duid
     * @return
     */
    @Override
    public List<WeChatReturnClient> findAllListReturnClientByStatusNo(String mid, String did, String duid) {
        List<WeChatReturnClient> findAllListReturnClientByStatusNo = weChatReturnDao.findAllListReturnClientByStatusNo(mid, did, duid);
        return findAllListReturnClientByStatusNo;
    }

    /**
     * 查询全部回访列表
     * @param mid
     * @param did
     * @param duid
     * @return
     */
    @Override
    public List<WeChatReturnClient> findAllListReturnClientByAll(String mid, String did, String duid) {
        List<WeChatReturnClient> findAllListReturnClientByAll = weChatReturnDao.findAllListReturnClientByAll(mid, did, duid);
        return findAllListReturnClientByAll;
    }

    /**
     * 确认回访
     * @param mid
     * @param did
     * @param clientId
     * @return
     */
    @Override
    public int editLastReturnTime(String mid, String did, String clientId) {
        int editLastReturnTime = weChatReturnDao.editLastReturnTime(mid, did, clientId);
        return editLastReturnTime;
    }
}
